<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class InitUpdate14 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('boxes', function (Blueprint $table) {
            $table->string('small_box_image')->nullable()->comment('大箱子中小箱子图片'); 
            $table->integer('bg_color_mode')->nullable()->default(1)->comment('NULL或1为亮色调 2为暗色调');
            $table->integer('theme_mode')->nullable()->default(1)->comment('1默认为3D版 2为扁平风版'); 
        });

        Schema::table('activities', function (Blueprint $table) {
            $table->text('rule')->nullable()->comment('规则文字');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('boxes', function (Blueprint $table) {
            $table->dropColumn('small_box_image');
            $table->dropColumn('bg_color_mode');
            $table->dropColumn('theme_mode');
            // $table->dropColumn('user_id');
        });

        Schema::table('activities', function (Blueprint $table) {
            $table->dropColumn('rule');
        });
    }
}
